<template>
	<el-container>
		<el-main class="nopadding">
			<scTable ref="table" :apiObj="apiObj" row-key="contractId" stripe remoteSort remoteFilter>
				<el-table-column label="#" type="index" width="50"></el-table-column>
				<el-table-column label="人员姓名" prop="userName" width="100"></el-table-column>
				<el-table-column label="奖惩事件" prop="incentiveItemName" width="150"></el-table-column>
				<el-table-column label="奖惩类型" prop="incentiveTypeName" width="100"></el-table-column>
				<el-table-column label="处理日期" prop="incentiveTime" width="150"></el-table-column>
				<el-table-column label="金额" prop="incentiveAmount" width="150">
					<template #default="scope">
						{{scope.row.incentiveAmount}}/元
					</template>
				</el-table-column>
				<el-table-column label="备注说明" prop="remark" width="150" :show-overflow-tooltip="true"></el-table-column>
				<el-table-column label="操作" fixed="right" align="right" width="100">
					<template #default="scope">
						<el-button-group>
							<el-button text type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button>
						</el-button-group>
					</template>
				</el-table-column>
			</scTable>
		</el-main>
	</el-container>
	<contractDetails v-if="dialog.detailsSave" ref="detailsDialog" @closed="dialog.detailsSave=false"></contractDetails>
</template>

<script>
import contractDetails from '@/views/hr/personfile/incentive/details'
export default {
	name: 'My Incentive Manage',
	components: {
		contractDetails,
	},
	data() {
		return {
			dialog: {
				detailsSave:false,
			},
			apiObj: this.$API.hr.hrIncentive.getMyHrIncentiveList,
		}
	},
	mounted() {
	},
	methods: {
		//查看
		table_show(row) {
			this.dialog.detailsSave = true
			this.$nextTick(() => {
				this.$refs.detailsDialog.open('setting').setData(row)
			})
		},
		//本地更新数据
		handleSaveSuccess() {
			this.$refs.table.refresh()
		}
	}
}
</script>

<style>
</style>
